﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _1.a1
{
    class Program
    {
        static void Main(string[] args)
        {

            Console.WriteLine("请选择计算模式（输入对应符号）：+，-，*，/");
            char op = Console.ReadLine()[0];
            Console.WriteLine("请输入第一个数值");
            double a = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine("请输入第二个数值");
            double b = Convert.ToDouble(Console.ReadLine());

            double resultab = 0;
            bool flag = true; ;

            if (op == '+')
            {
                resultab = a + b;
            }else if (op == '-')
            {
                resultab = a - b;
            }else if (op == '*')
            {
                resultab = a * b;
            }else if (op == '/')
            {
                resultab = a / b;
            }
            else
            {
                flag = false;
                Console.WriteLine("未知运算符");
            }
            if (flag)
            {
                Console.WriteLine("结果为：" + resultab);
            }

            Console.ReadLine();

        }
    }

}
